home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re How to solve access excepti < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.5 KB  |  [TEXT/ttxt]

  1. Subject:     Re: How to solve access exception during part close?
  2. Sent:        9/17/96 11:28 AM
  3. Received:    9/17/96 11:28 AM
  4. From:        mlanett@meer.net (Mark Lanett)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. >I'm getting an access exception when I try to close my part (via the
  10. >window close box). In MacsBug it says: "access exception at somIsObj..."
  11. >After I issue an "ea" in MacsBug I get a dialog saying: "The file
  12. >was not found."
  13.  
  14. Do you get any kind of stack crawl?
  15.  
  16. >Since the window is instantiated with a plain-old C++ new, rather than
  17. >an FW_CNew, I don't understand how it gets destructed - but surely it
  18. >does since samples like ODFForm and ODFDraw do the same thing without
  19. >crashing.
  20.  
  21. FW_NEW handles exceptions during object construction (and some related
  22. stuff). It doesn't make an object garbage-collectable or anything like
  23. that. Therefore whether something is allocated with FW_NEW or ::new, you
  24. still have to delete it (there is no FW_DELETE; regular delete suffices for
  25. both). ODF handles this for window objects.
  26.  
  27. >Any ideas on how I can solve this?
  28.  
  29. Some people are distressed that I have to make this suggestion, but I've
  30. found it to be extremely effective at times: use the debugging build of
  31. OpenDoc and put the symbol files (on DR5) in the OpenDoc libraries folder,
  32. and keep them open in the debugger. You'll get stack crawls going back
  33. through OpenDoc when a crash occurs.
  34.  
  35.  
  36. --
  37. Mark Lanett, OpenDoc Framework, Apple Computer